package com.pojo;


import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.sql.Date;
@Data
public class User {

  private int id;
  private String username;
  private String password;
  @JsonFormat(pattern = "yyyy-MM-dd")
  private Date birthday;
  private String sex;
  private TabAddress tabAddress;

    public User(int id, String username, String password, Date birthday, String sex, TabAddress tabAddress) {
        this.id = id;
        this.username = username;
        this.password = password;
        this.birthday = birthday;
        this.sex = sex;
        this.tabAddress = tabAddress;
    }

    public User() {
    }

    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", username='" + username + '\'' +
                ", password='" + password + '\'' +
                ", birthday=" + birthday +
                ", sex='" + sex + '\'' +
                ", tabAddress=" + tabAddress +
                '}';
    }
}
